<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet"
	href="statics/css/maps/jquery-jvectormap-2.0.3.css">
<link rel="stylesheet"
	href="statics/css/bootstrap-progressbar-3.3.4.min.css">
<link rel="stylesheet" href="${initParam.url}/statics/css/bootstrap.min.css">
<link rel="stylesheet" href="${initParam.url}/statics/css/custom.min.css">
<link rel="stylesheet" href="${initParam.url}/statics/css/dropzone.min.css">
<link rel="stylesheet" href="${initParam.url}/statics/css/font-awesome.min.css">
<link rel="stylesheet" href="${initParam.url}/statics/css/green.css">
<link rel="stylesheet"
	href="statics/css/jquery.mCustomScrollbar.min.css">
<link rel="stylesheet" href="${initParam.url}/statics/css/jqvmap.min.css">
<link rel="stylesheet" href="${initParam.url}/statics/css/nprogress.css">
<style type="text/css">
.clear
{

clear:both;

}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>



<body class="nav-md">
<div class="container body">
<div class="main_container">
	<!-- 页眉 -->
	<tiles:insertAttribute name="header"/>
	<!-- 左侧工具栏 -->
	<tiles:insertAttribute name="nav-left"/>
	<!-- 内容 -->
	<div id="main" >
	<tiles:insertAttribute name="main" />
	</div>
	</div>

</div>

</body>

<script type="text/javascript"
	src="${initParam.url}/statics/js/jquery.min.js"></script>
<script type="text/javascript"
	src="${initParam.url}/build/js/custom.min.js"></script>

<script type="text/javascript"
	src="${initParam.url}/statics/js/bootstrap.min.js"></script>
<script type="text/javascript"
	src="${initParam.url}/statics/js/dropzone.js"></script>
<script type="text/javascript"
	src="${initParam.url}/statics/js/fastclick.js"></script>
<script type="text/javascript"
	src="${initParam.url}/statics/js/jquery.mCustomScrollbar.concat.min.js"></script>

<script type="text/javascript"
	src="${initParam.url}/statics/js/nprogress.js"></script>
<script type="text/javascript"
	src="${initParam.url}/statics/js/validator.js"></script>
<script type="text/javascript"
	src="${initParam.url}/statics/js/moment/moment.min.js"></script>
<script type="text/javascript"
	src="${initParam.url}/statics/js/datepicker/daterangepicker.js"></script>
<script type="text/javascript"
	src="${initParam.url}/statics/js/datepicker/bootstrap-datetimepicker.fr.js"></script>
<script type="text/javascript"
	src="${initParam.url}/statics/js/datepicker/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript"
	src="${initParam.url}/statics/js/custom.min.js"></script>
<script>
    function init() {
        //定义locale汉化插件
        var locale = {
            "format": 'YYYY-MM-DD',
            "separator": " -222 ",
            "applyLabel": "确定",
            "cancelLabel": "取消",
            "fromLabel": "起始时间",
            "toLabel": "结束时间'",
            "customRangeLabel": "自定义",
            "weekLabel": "W",
            "daysOfWeek": ["日", "一", "二", "三", "四", "五", "六"],
            "monthNames": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
            "firstDay": 1
        };
        //初始化显示当前时间
        $('#daterange-btn span').html(moment().subtract('hours', 1).format('YYYY-MM-DD') + ' - ' + moment().format('YYYY-MM-DD'));
        $('#daterange-btn2 span').html(moment().subtract('hours', 1).format('YYYY-MM-DD') + ' - ' + moment().format('YYYY-MM-DD'));
        //日期控件初始化
        $('#daterange-btn').daterangepicker(
            {
                'locale': locale,
                //汉化按钮部分
                ranges: {
                    '今日': [moment(), moment()],
                    '昨日': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
                    '最近7日': [moment().subtract(6, 'days'), moment()],
                    '最近30日': [moment().subtract(29, 'days'), moment()],
                    '本月': [moment().startOf('month'), moment().endOf('month')],
                    '上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
               },
                startDate: moment().subtract(29, 'days'),
                endDate: moment()
            },
            function (start, end) {
                $('#daterange-btn span').html(start.format('YYYY-MM-DD') + ' - ' + end.format('YYYY-MM-DD'));
            }
       );
        $('#daterange-btn2').daterangepicker(
                {
                    'locale': locale,
                    //汉化按钮部分
                    ranges: {
                        '今日': [moment(), moment()],
                        '昨日': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
                        '最近7日': [moment().subtract(6, 'days'), moment()],
                        '最近30日': [moment().subtract(29, 'days'), moment()],
                        '本月': [moment().startOf('month'), moment().endOf('month')],
                        '上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
                   },
                    startDate: moment().subtract(29, 'days'),
                    endDate: moment()
                },
                function (start, end) {
                    $('#daterange-btn2 span').html(start.format('YYYY-MM-DD') + ' - ' + end.format('YYYY-MM-DD'));
                }
           );
    };
    $(document).ready(function() {
        init();
        
    });
    $('.form_datetime').datetimepicker({
        weekStart: 0, //一周从哪一天开始
        todayBtn:  1, //
        autoclose: 1,
        todayHighlight: 1,
        startView: 2,
        forceParse: 0,
        showMeridian: 1
    });
    
    
</script>

<script type="text/javascript">
$(function(){
	$("#addVersionbt").click(function(){
		$("#func-title").html("增加版本");
		$("input[name='id']").attr("value",null);
		$("input[name='versionNo']").attr("readonly",null);
		$(".versionform").attr("action","${initParam.url}/dev/addversion");
	})
	$(".updateVersionbt").click(function(){
		
		$("#func-title").html("修改版本");
		var vid=$(this).attr("vid");
		var vno=$(this).attr("versionNo");
		var apklocPath=$(this).attr("apklocPath");
		var versionSize=$(this).attr("versionSize");
		var versionInfo=$(this).attr("versionInfo");
		
		
		$("input[name='id']").attr("value",vid);
		$("input[name='versionNo']").attr("value",vno);
		$("input[name='versionNo']").attr("readonly","readonly");
		
		$("input[name='versionSize']").attr("value",versionSize);
		$("textarea[name='versionInfo']").html(versionInfo);
		
		$(".versionform").attr("action","${initParam.url}/dev/updateVersion");
		
	})
})
</script>

</html>